/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cxhd.pacs;

import com.cxhd.pacs.plugins.BasePlugin;
import com.cxhd.pacs.plugins.LisDataPlugin;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author 52461
 */
public class RegisterPlugin {

    public static RegisterPlugin registerPlugin;

    public Map<String, BasePlugin> mapPlugin = new HashMap<String, BasePlugin>();

    public static RegisterPlugin getInstance() {
        if (registerPlugin == null) {
            registerPlugin = new RegisterPlugin();
            registerPlugin.addPlugin();
        }
        return registerPlugin;
    }
    

    private void addPlugin() {

        mapPlugin.put("plugin_lis_data", new LisDataPlugin());
    }
    
    public BasePlugin getPlugin(String pluginName){
     
       return mapPlugin.get(pluginName);
        
    }

}
